DokuWiki

It's better when it's simple

User Tools

Site Tools


install:fedora

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
install:fedora [2014-09-09 18:26] 200.46.38.75install:fedora [2024-04-26 17:03] (current) – [Solution 3] 2a02:8012:102b:0:120b:db7:2bbd:6bc
Line 1: Line 1:
 ====== Fedora Package ====== ====== Fedora Package ======
  
-DokuWiki is available in the Fedora repositories. These instructions are written for Fedora 19, there may be differences for other versions. Do/+DokuWiki is available in the Fedora repositories. These instructions are written for Fedora 19, there may be differences for other versions. Do
  
-  yum install dokuwiki dokuwiki-selinux+  dnf install httpd php dokuwiki dokuwiki-selinux
  
 The package ''dokuwiki-selinux'' is necessary for the Configuration Manager of DokuWiki to work. It configures [[wp>Security-Enhanced Linux|SELinux]] to allow dokuwiki to write to its configuration. The package ''dokuwiki-selinux'' is necessary for the Configuration Manager of DokuWiki to work. It configures [[wp>Security-Enhanced Linux|SELinux]] to allow dokuwiki to write to its configuration.
  
-Package details are available at https://admin.fedoraproject.org/pkgdb/acls/name/dokuwiki+Package details are available at https://admin.fedoraproject.org/pkgdb/package/rpms/dokuwiki/
  
 ===== httpd ===== ===== httpd =====
Line 92: Line 92:
  
 Tried with Fedora 20 on 2014-02-17. Tried with Fedora 20 on 2014-02-17.
 +
 +
 +==== Solution 3 ====
 +
 +The Fedora ''dokuwiki-selinux-20230404a-4.fc40.noarch'' package's postinstall-script adds the following fcontext policy entries:
 +
 +<code>
 +semanage fcontext -a -t httpd_sys_rw_content_t '/etc/dokuwiki(/.*)?'
 +semanage fcontext -a -t httpd_sys_content_t '/usr/share/dokuwiki(/.*)?'
 +semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/dokuwiki/lib/plugins(/.*)?'
 +restorecon -R '/etc/dokuwiki'
 +restorecon -R '/usr/share/dokuwiki'
 +</code>
 +
 +In addition, The Fedora dokuwiki package places the ''data'' subdirectory in ''/var/lib/dokuwiki'', which has the following policy:
 +
 +<code>
 +$ ls -laZ /var/lib/dokuwiki/
 +total 12
 +drwxr-xr-x.  3 root   root   system_u:object_r:httpd_sys_rw_content_t:s0 4096 Apr 26 15:28 .
 +drwxr-xr-x. 28 root   root   system_u:object_r:var_lib_t:s0              4096 Apr 26 15:28 ..
 +drwxr-xr-x. 13 apache apache system_u:object_r:httpd_sys_rw_content_t:s0 4096 Apr 26 15:28 data
 +</code>
 +
 +Based on the above, the following policies should be needed when installing dokuwiki from the original tarball under /srv/http/wiki.example.net/:
 +
 +<code>
 +semanage fcontext -a -t httpd_sys_content_t '/srv/http/wiki.example.net(/.*)?'
 +semanage fcontext -a -t httpd_sys_rw_content_t '/srv/http/wiki.example.net/conf(/.*)?'
 +semanage fcontext -a -t httpd_sys_rw_content_t '/srv/http/wiki.example.net/data(/.*)?'
 +semanage fcontext -a -t httpd_sys_rw_content_t '/srv/http/wiki.example.net/lib/plugins(/.*)?'
 +</code>
 +==== Solution 4 ====
 +The ''chcon'' command changes the SELinux context for files temporary. These changes do not survive a file system relabel, or the ''restorecon'' command.
 +
 +    chcon -t httpd_sys_rw_content_t /etc/dokuwiki/ -R
 +    chcon -t httpd_sys_content_t /usr/share/dokuwiki/ -R
 +    chcon -t httpd_sys_rw_content_t /usr/share/dokuwiki/lib/plugins/ -R
 +
 +You can restore default SELinux context for this files by running:
 +    restorecon -R '/etc/dokuwiki/'
 +    restorecon -R '/usr/share/dokuwiki/'
 +    restorecon -R '/usr/share/dokuwiki/lib/plugins/'
 +
 +====== Install the package downloaded from the website ======
 +
 +See [[https://openhsc.org/wiki/install_nginx_and_dokuwiki_on_fedora_server_29|this wiki page on how to install DokuWiki with nginx on Fedora 29]]
install/fedora.1410279964.txt.gz · Last modified: 2014-09-09 18:26 by 200.46.38.75

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki